<template>
	<view>
		<view class="activityHead flex_a">
			<view :class="active=='未开始'?'f-t':''" @click="activeFn('未开始')">未开始</view>
			<view :class="active=='进行中'?'f-t':''" @click="activeFn('进行中')">进行中</view>
			<view :class="active=='已结束'?'f-t':''" @click="activeFn('已结束')">已结束</view>
		</view>
		<block v-if="activeList.length">
		<block v-for="(item,i) in activeList" :key="i">
			<activity :activeItem="item" type="my"></activity>
		</block>
		</block>
		<block v-else>
			<noneList></noneList>
		</block>
		<view class="bottom-mar"></view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				active:'未开始',
				activeList:[]
			};
		},
		onLoad() {
			this.myactiveListFn()
		},
		methods:{
			myactiveListFn() {
				this.$api.sendRequest({
					url:'/api/active/myactiveList',
					data:{
						pege:1,
						limit:10,
						status:this.active
					},success:res=>{
						this.activeList = res.data.data
					}
				})
			},
			activeFn(type) {
				this.active = type
				this.myactiveListFn()
			}
		}
	}
</script>

<style lang="scss">
	.activityHead {
		height: 100rpx;
		background-color: #fff;
	}

</style>
